window.appModule.factory('robotAPI',factoryFn);

function factoryFn($resource){
    var actions = {
        getUserById: {
            url: ENV['API_URL']+'/openfaqserver/getUserById.action',
            method: 'post'
        },
        getRobotsByUserId: {
            url: ENV['API_URL']+'/openfaqserver/getRobotsByUserId.action',
            method: 'post'
        },
        getMenusByUserId: {
            url: ENV['API_URL']+'/openfaqserver/getMenusByUserId.action',
            method: 'post'
        },
        logOut: {
            url: ENV['API_URL']+'/openfaqserver/logOut.action',
            method: 'post'
        }
    };
    return $resource('', {_ajaxWrapOption: {}},actions);
};